package com.koi.pojo.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author ･ᴗ･
 * @description [操作日志模型]
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_oper_log")
public class SysOperLog implements Serializable {

    /**
     * 操作主键
     */
    @TableId(value = "oper_id", type = IdType.ASSIGN_ID)
    private Long operId;

    /**
     * 操作名称
     */
    @TableField(value = "oper_name")
    private String operName;

    /**
     * 操作类型[OTHER其它 INSERT新增 UPDATE修改 DELETE删除]
     */
    @TableField(value = "oper_type")
    private String operType;

    /**
     * 方法名称
     */
    @TableField(value = "method_name")
    private String methodName;

    /**
     * 请求方式
     */
    @TableField(value = "request_method")
    private String requestMethod;

    /**
     * 系统类型[OTHER其它 MANAGER后台用户 PHONE手机端用户]
     */
    @TableField(value = "system_type")
    private String systemType;

    /**
     * 操作人员
     */
    @TableField(value = "oper_man")
    private String operMan;

    /**
     * 请求URL
     */
    @TableField(value = "oper_url")
    private String operUrl;

    /**
     * 主机地址
     */
    @TableField(value = "oper_ip")
    private String operIp;

    /**
     * 操作地点
     */
    @TableField(value = "oper_location")
    private String operLocation;

    /**
     * 请求参数
     */
    @TableField(value = "oper_param")
    private String operParam;

    /**
     * 返回参数
     */
    @TableField(value = "json_result")
    private String jsonResult;

    /**
     * 操作状态[0-正常 1-异常]
     */
    @TableField(value = "oper_status")
    private String operStatus;

    /**
     * 错误消息
     */
    @TableField(value = "error_msg")
    private String errorMsg;

    /**
     * 操作时间
     */
    @TableField(value = "oper_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date operTime;

    /**
     * 消耗时间[毫秒]
     */
    @TableField(value = "cost_time")
    private String costTime;

}
